import { lazy } from "react";

/** 路由懒加载 */
const Dashboard = lazy(() => import("@/pages/Home/Dashboard"));
const UserList = lazy(() => import("@/pages/Home/Users/UserList"));
const UserAdd = lazy(() => import("@/pages/Home/Users/UserAdd"));
const Tenement = lazy(() => import("@/pages/Home/Estate/Tenement"));
const Room = lazy(() => import("@/pages/Home/Estate/Room"));
const Car = lazy(() => import("@/pages/Home/Estate/Car"));
const Repair = lazy(() => import("@/pages/Home/Repair"));
const Contract = lazy(() => import("@/pages/Home/Finance/Contract"));
const Surrender = lazy(() => import("@/pages/Home/Finance/Surrender"));
const Bill = lazy(() => import("@/pages/Home/Finance/Bill"));
const Merchants = lazy(() => import("@/pages/Home/Merchants"));
const OperationAll = lazy(() => import("@/pages/Home/Operation/OperationAll"));
const Article = lazy(() => import("@/pages/Home/Operation/Article"));
const Comments = lazy(() => import("@/pages/Home/Operation/Comments"));
const Equipment = lazy(() => import("@/pages/Home/Equipment"));
const Enengy = lazy(() => import("@/pages/Home/Energy"));
const Settings = lazy(() => import("@/pages/Home/Settings"));
const Personal = lazy(() => import("@/pages/Home/Personal"));

/** 动态路由对应表 */
const routeMap: any = {
  "/dashboard": <Dashboard />,
  "/users/list": <UserList />,
  "/users/add": <UserAdd />,
  "/estate/tenement": <Tenement />,
  "/estate/room": <Room />,
  "/estate/car": <Car />,
  "/repair": <Repair />,
  "/finance/contract": <Contract />,
  "/finance/surrender": <Surrender />,
  "/finance/bill": <Bill />,
  "/merchants": <Merchants />,
  "/operation/all": <OperationAll />,
  "/operation/article": <Article />,
  "/operation/comments": <Comments />,
  "/equipment": <Equipment />,
  "/energy": <Enengy />,
  "/settings": <Settings />,
  "/personal": <Personal />,
};

export default routeMap;
